home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 768 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  938 b 

  1. Path: news.rwth-aachen.de!news
  2. From: bayerle@pool.informatik.rwth-aachen.de (Edmund Bayerle)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: No dynamic binding??
  5. Date: Sun, 07 Jan 1996 00:08:55 GMT
  6. Organization: RWTH -Aachen / Rechnerbetrieb Informatik
  7. Message-ID: <4cn2ol$fpa@news.rwth-aachen.de>
  8. References: <8B452C3.0054012D3F.uuout@swcbbs.com>
  9. Reply-To: Edmund Bayerle <bayerle@pool.informatik.rwth-aachen.de>
  10. NNTP-Posting-Host: edmund.kawo2.rwth-aachen.de
  11. X-Newsreader: Forte Free Agent 1.0.82
  12.  
  13. ken.brady@swcbbs.com (KEN BRADY) wrote:
  14.  
  15.  
  16. >class Object {
  17. >  ...
  18. >};
  19.  
  20. >class Atype: Object {
  21. >  ...
  22. >};
  23.  
  24. >typedef Object * Objptr
  25.  
  26. >void AFunction(Objptr O)
  27. >{...}
  28.  
  29.  
  30. >        AType A;
  31. >        AFunction(A);
  32.  
  33. Note that A is not of Type pointer to Object, it is an Object itself.
  34. Try:
  35.     AFunction(&A);
  36.  
  37. "AFunction" is a ordinary function that has nothing to do with dynamic
  38. binding, nor has it something in common with virtual function.
  39.  
  40.  
  41. Edmund B.
  42.  
  43.